<?php

	# GEN TASK
	$GetRule = $GLOBALS['MYT']->db_array("SELECT * FROM systemoffice.staff_rules WHERE srl_Flag = 2 AND srl_PID = {$PID}");
	$TaskTime = str_replace("'","",$TaskTime);
	for ($i=1;$i<=$GetRule[0];$i++) {
			$GLOBALS['MYT']->db_query("INSERT INTO systemoffice.sys_tasks 
			(stk_ProcessID, stk_ProcesstoUser, stk_Flag, stk_PrcDateTime, stk_RegID)
			VALUES
			({$GetRule[$i]['srl_PID']},{$GetRule[$i]['srl_User']},2,'{$TaskTime}',{$RegID})");
		}
	include($GLOBALS['BIB'].'Pr_db/prc_modules/rh_checklist.php');